public class Triangle extends GeometricObject{
    private double width;
    private double height;
    private double sideA;    // 边1
    private double sideB;   // 边2
    private double sideC;  //


    public Triangle(double sideA,double sideB,double sideC,double width,double height){
        this.width=width;
        this.height=height;
        this.sideA=sideA;
        this.sideB=sideB;
        this.sideC=sideC;
    }
    public double getWidth() {
        return width;
    }

    public void setWidth(double width) {
        this.width = width;
    }

    public double getHeight() {
        return height;
    }

    public void setHeight(double height) {
        this.height = height;
    }

    public double getSideA() {
        return sideA;
    }

    public void setSideA(double sideA) {
        this.sideA = sideA;
    }

    public double getSideB() {
        return sideB;
    }

    public void setSideB(double sideB) {
        this.sideB = sideB;
    }

    public double getSideC() {
        return sideC;
    }

    public void setSideC(double sideC) {
        this.sideC = sideC;
    }

    public double getArea() {
        return sideA * height/2;  //三角形面积公式
    }

    public double getPerimeter() {
        return sideA + sideB +sideC;
    }   // 三角形的周长公式
}
